package com.sg.service.impl;

import com.sg.mapper.UserMapper;
import com.sg.model.User;
import com.sg.service.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by shugen on 2017/7/25.
 */
//@Service(value="TestService")
@Service
public class TestServiceImpl  implements TestService{
    @Autowired
    UserMapper userMapper;
    public void test() {
        System.out.println("Spring");
    }
    public void getUser(){
        Map map=new  HashMap();
       List<User> list= userMapper.getAllUser();
        System.out.println(list.size());
    }

    public void del() {
        Map map=new  HashMap();
        map.put("id","10");
        userMapper.deleteById(10);
        System.out.println("删除");
    }
}
